package lxx.springbootdemo.swaggerdemo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@ApiModel
public class user {

    @ApiModelProperty(value = "用户名", dataType = "String",  example = "离歌")
    private String name;
    @ApiModelProperty(value = "性别", dataType = "String", example = "男")
    private String sex;

    public static final class userBuilder {
        private String name;
        private String sex;

        private userBuilder() {
        }

        public static userBuilder anuser() {
            return new userBuilder();
        }

        public userBuilder withName(String name) {
            this.name = name;
            return this;
        }

        public userBuilder withSex(String sex) {
            this.sex = sex;
            return this;
        }

        public user build() {
            user user = new user();
            user.sex = this.sex;
            user.name = this.name;
            return user;
        }
    }
}
